/*
 * @Author: Yonyou
 * @Date: 2020-03-11 11:17:14
 * @LastEditTime: 2020-09-08 16:48:42
 * @LastEditors: hanfengmi
 * @Description: 请求预处理
 */

import { stringify } from 'qs'
import request from './request'

// 测试环境url
const apiUrl = val => {
  if(process.env.NODE_ENV === 'development') {
    return `/api/${val}`
  }else {
    return `${ window.location.origin }/${val}`
  }
}
export { stringify, apiUrl, request }
